package com.zxy.ziems.server.device.pojo.bo;

/**
 * 三元组
 * @author 10348359
 * @create 2024-03-29 10:30
 */
public class Triplet<T, U, V> {
    private final T first;
    private final U second;
    private final V third;

    private Triplet(T first, U second, V third) {
        this.first = first;
        this.second = second;
        this.third = third;
    }

    public static<T, U, V> Triplet<T, U, V> of(T first, U second, V third) {
        return new Triplet<>(first, second, third);
    }

    public T getFirst() {
        return first;
    }

    public U getSecond() {
        return second;
    }

    public V getThird() {
        return third;
    }

    @Override
    public String toString() {
        return "(" + first + ", " + second + ", " + third + ")";
    }

}